from faker import Faker

s='XieZhuoYu'
print(s.lower())
print(s.upper())
print(s.split('Z')[0])
print(s.find('Y'))
print(s.find('y'))

print(s.startswith('Xie'))
print(s.endswith('Yu'))

#1是替换次数
print(s.replace('Zhuo','Zhang',1))
print(s.join("wo"))
print(s.center(20,'*'))#在字符串中间填充

a='   xie   '
print(a.strip())
b='   xie yu  '
print(b.lstrip())
v='   xie  yu '
print(v.rstrip())

b='xie#zhuo#yu'
print(b.rstrip('yu'))
print(b.strip('iex'))#与顺序无关


faker = Faker('zh_CN')
print(faker.name(),faker.address(),faker.phone_number(),faker.date_of_birth(),faker.email())
print(faker.text())